package com.zp.qualitypractice.rx.event;

import android.os.Bundle;

import java.util.Random;

/**
 * Created by izp on 2017/9/4.
 */

public class EventMain {
    private String from;
    private int id;
    private Bundle bundle;
    private String msg;

    public EventMain(Object from) {
        this.from = from.getClass().getSimpleName();
        this.id = new Random().nextInt(100);
    }

    public Bundle getBundle() {
        return bundle;
    }

    public EventMain setBundle(Bundle bundle) {
        this.bundle = bundle;
        return this;
    }

    public EventMain setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public String getMsg() {
        return msg ;
    }

    public String getInfo() {
        return getClass().getSimpleName()+" from "+from +",EventId "+ id ;
    }
}
